<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="../public/css/bootstrap.min.css">
<link rel="stylesheet" href="../public/css/font-awesome.min.css">
<link rel="stylesheet" href="../public/plugins/jqgrid/ui.jqgrid-bootstrap.css">
<link rel="stylesheet" href="../public/plugins/ztree/css/metroStyle/metroStyle.css">
<link rel="stylesheet" href="../public/css/main.css">
<!-- 
<link rel="stylesheet" href="../public/plugins/jquery-validate-1.13.0/jquery.validate.css">
<link rel="stylesheet" href="../public/plugins/bootstrap-table-1.11.0/bootstrap-table.min.css">
 -->
<script src="../public/libs/jquery.min.js"></script>
<script src="../public/plugins/layer/layer.js"></script>
<script src="../public/libs/bootstrap.min.js"></script>
<script src="../public/libs/vue.min.js"></script>
<script src="../public/libs/vue-i18n.js"></script>
<!-- 
<script src="../public/plugins/jqgrid/grid.locale-cn.js"></script>
-->
<script src="../public/plugins/jqgrid/jquery.jqGrid.min.js"></script>
<script src="../public/plugins/ztree/jquery.ztree.all.min.js"></script>

<script src="../public/plugins/jquery-validate-1.13.0/jquery.validate.min.js"></script>
<script src="../public/plugins/jquery-validate-1.13.0/jquery.metadata.js"></script>

<script src="../public/plugins/bootstrap-table-1.11.0/bootstrap-table.min.js"></script>

 

<script src="../public/js/common.js"></script> 


</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">
			<div class="form-group col-sm-2">
				<input type="text" class="form-control holderClz" id="keyname" v-model="q.keyname" @keyup.enter="query"  placeholder="">
			</div>
			<a class="btn btn-primary" @click="query">{{$t("query")}}</a>
			<!--		
			<a v-if="hasPermission('crm:user:save')" class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;{{$t("add")}}</a>
			
			<a v-if="hasPermission('crm:user:update')" class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;{{$t("edit")}}</a>
			
			<a v-if="hasPermission('crm:user:delete')" class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;{{$t("delete")}}</a>
			-->
		</div>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>
    
    <div id="deviceGridParent"  >
    	<table id="deviceGrid"></table>
    </div>
    
    <div v-show="!showList && showDetail" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal" id="detailForm">
											<div class="form-group">
			   	<div class="col-sm-2 control-label">{{$t("email")}}</div>
			   	<div class="col-sm-10">
			      
			      <p class="form-control-static" > {{user.email}}</p>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">{{$t("mobile")}}</div>
			   	<div class="col-sm-10">
			        <p class="form-control-static" > {{user.mobile}}</p>
			    </div>
			</div>
			 
 
									<div class="form-group">
			   	<div class="col-sm-2 control-label">{{$t("nickName")}}</div>
			   	<div class="col-sm-10">
			        <p class="form-control-static" > {{user.nickName}}</p>
			    </div>
			</div>	
			 
			 <div class="form-group"  v-show="showAvatar">
			   	<div class="col-sm-2 control-label">{{$t("avatar")}}</div>
			   	<div class="col-sm-10">
			 		    <img v-bind:src="user.avatarPath" width="100px" height="100px"></img>
			    </div>
			</div>
				<!-- 	
			 						<div class="form-group">
			   	<div class="col-sm-2 control-label">{{$t("registerRegion")}}</div>
			   	<div class="col-sm-10">
			       <p class="form-control-static" > {{user.registerRegion}}</p>
			    </div>
			</div>			
			 -->
									<div class="form-group">
			   	<div class="col-sm-2 control-label">{{$t("registerTime")}}</div>
			   	<div class="col-sm-10">
			        <p class="form-control-static" > {{user.registerTime}}</p>
			    </div>
			</div>		

 
 
			<div class="form-group">
			   	<div class="col-sm-2 control-label">{{$t("status")}}</div>
			   	<div class="col-sm-10">
			        <p class="form-control-static" >{{user.statusName}}</p>
			    </div>
			</div>
			
			<div class="form-group">
			   	<div class="col-sm-2 control-label">{{$t("device")}}</div>
			   	<div class="col-sm-10">
			         <table class="table table-bordered table-condensed">
					   <thead>
					  	<tr >
					      <th>{{$t("deviceName")}}</th>
					      <th>{{$t("modelCode")}}</th>
					      <th>{{$t("deviceId")}}</th>
					      <th>{{$t("city")}}</th>
					      <th>{{$t("region")}}</th>
					      <th>{{$t("timezone")}}</th>
					      <th>{{$t("dst")}}</th>
					      <th>{{$t("bindTime")}}</th>
					    </tr>
					    </thead>
					    <tbody>
					    <tr v-for="tr in user.devices">
					      <td>{{tr.deviceName}}</td>
					      <td>{{tr.modelCode}}</td>
					      <td>{{tr.deviceId}}</td>
					      
					      <td>{{tr.city}}</td>
					      <td>{{tr.region}}</td>
					      <td>{{tr.timezone}}</td>
					      <td>{{tr.dstFlag}}</td>
					      <td>{{tr.bindTime}}</td>
					    </tr>
					  </tbody>
					</table>
			    </div>
			</div>
						
  
							<div class="form-group">
				<div class="col-sm-2 control-label"></div> 
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="returnList" v-model='lable.back'/>
			</div>
		</form>
	</div>
	    
    <div v-show="!showList && !showDetail" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal" id="contentForm">
											<div class="form-group">
			   	<div class="col-sm-2 control-label">{{$t("email")}}</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control holderClz" id="email" v-model="user.email" placeholder=""/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">{{$t("mobile")}}<font color="red">*</font></div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control required number" name="mobile" v-model="user.mobile" placeholder=""/>
			    </div>
			</div>
 
									<div class="form-group">
			   	<div class="col-sm-2 control-label">{{$t("nickName")}}<font color="red">*</font></div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control required" v-model="user.nickName" placeholder=""/>
			    </div>
			</div>			 
									<div class="form-group">
			   	<div class="col-sm-2 control-label">{{$t("avatar")}}</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="user.avatar" placeholder=""/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">{{$t("registerTime")}}</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="user.registerTime" placeholder=""/>
			    </div>
			</div>		
			 						<div class="form-group">
			   	<div class="col-sm-2 control-label">{{$t("registerRegion")}}</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control holderClz" id="region" v-model="user.registerRegion" placeholder="CN-中国 USA-美国"/>
			    </div>
			</div>
 
 
									<div class="form-group">
			   	<div class="col-sm-2 control-label">{{$t("status")}}</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control holderClz" id="status" v-model="user.status" placeholder='0-未激活 1-激活'/>
			    </div>
			</div>
 
							<div class="form-group">
				<div class="col-sm-2 control-label"></div> 
				<input type="button" class="btn btn-primary" @click="saveOrUpdate" v-model='lable.ok'></input>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" v-model='lable.back'/>
			</div>
		</form>
	</div>
</div>

<script src="../public/js/crm/user-i18n.js?v=5"></script>
<script src="../public/js/crm/user.js?v=5"></script>

 
</body>
</html>